{% if network.pcap_sha256 %}

    <div class="alert alert-primary center">
        <a class="btn btn-secondary btn-sm" href="{% url "file" "pcap" id network.pcap_sha256 %}"><span class="fas fa-download"></span> PCAP</a>
        <a class="btn btn-secondary btn-sm" href="{% url "file" "pcapzip" id network.pcap_sha256 %}"><span class="fas fa-file-archive"></span><span class="fas fa-download"></span> PCAP</a>
        {% if tlskeys_exists %}
            <a class="btn btn-secondary btn-sm" href="{% url "file" "tlskeys" id network.pcap_sha256 %}"><span class="fas fa-download"></span> TLS keys</a>
        {% endif %}
    </div>
{% endif %}
    <ul class="nav nav-tabs flex-column flex-sm-row" style="margin-bottom: 0;">
        <li class="nav-item active"><a class="nav-link" href="#network_hosts_tab" data-toggle="tab">Hosts ({{ network.hosts|length }})</a></li>
        <li class="nav-item"><a class="nav-link" href="#network_dns_tab" data-toggle="tab">DNS ({{ network.domains|length }})</a></li>
        <li class="nav-item"><a class="nav-link" href="#network_tcp_tab" data-toggle="tab">TCP ({{ network.tcp|length }})</a></li>
        <li class="nav-item"><a class="nav-link" href="#network_udp_tab" data-toggle="tab">UDP ({{ network.udp|length }})</a></li>
        <li class="nav-item"><a class="nav-link" href="#network_http_tab" data-toggle="tab">
            {% if network.http_ex or network.https_ex %}
                HTTP(S) <span class="button-badge">({{ network.http_ex|add:network.https_ex|length }})</span>
            {% else %}
                HTTP <span class="button-badge">({{ network.http|length }})</span>
            {% endif %}
        </a></li>
        <li class="nav-item"><a class="nav-link" href="#network_smtp_tab" data-toggle="tab">SMTP ({{ network.smtp|length }})</a></li>
        <li class="nav-item"><a class="nav-link" href="#network_irc_tab" data-toggle="tab">IRC ({{ network.irc|length }})</a></li>
        <li class="nav-item"><a class="nav-link" href="#network_icmp_tab" data-toggle="tab">ICMP ({{ network.icmp|length }})</a></li>
        {% if config.cif %}
            <li class="nav-item"><a class="nav-link" href="#network_cif_tab" data-toggle="tab">CIF Results ({{ cif|length }})</a></li>
        {% endif %}
        {% if config.suricata %}
            <li class="nav-item"><a class="nav-link" href="#network_suri_alerts_tab" data-toggle="tab">Suricata Alerts ({{ suricata.alerts|length }})</a></li>
            <li class="nav-item"><a class="nav-link" href="#network_suri_tls_tab" data-toggle="tab">Suricata TLS ({{ suricata.tls|length }})</a></li>
            <li class="nav-item"><a class="nav-link" href="#network_suri_http_tab" data-toggle="tab">Suricata HTTP ({{ suricata.http|length }})</a></li>
            <li class="nav-item"><a class="nav-link" href="#network_suri_files" data-toggle="tab">Suricata Files ({{ suricata.files|length }})</a></li>
        {% endif %}
    </ul>
    <div class="tab-content">
        <div class="tab-pane fade show active" id="network_hosts_tab">{% include "analysis/network/_hosts.html" %}</div>
        <div class="tab-pane fade" id="network_tcp_tab">{% include "analysis/network/_tcp.html" %}</div>
        <div class="tab-pane fade" id="network_udp_tab">{% include "analysis/network/_udp.html" %}</div>
        <div class="tab-pane fade" id="network_dns_tab">{% include "analysis/network/_dns.html" %}</div>
        <div class="tab-pane fade" id="network_http_tab">{% include "analysis/network/_http.html" %}</div>
        <div class="tab-pane fade" id="network_smtp_tab">{% include "analysis/network/_smtp.html" %}</div>
        <div class="tab-pane fade" id="network_irc_tab">{% include "analysis/network/_irc.html" %}</div>
        <div class="tab-pane fade" id="network_icmp_tab">{% include "analysis/network/_icmp.html" %}</div>
        <div class="tab-pane fade" id="network_cif_tab">{% include "analysis/network/_cif.html" %}</div>
        <div class="tab-pane fade" id="network_suri_alerts_tab">{% include "analysis/network/_suricata_alerts.html" %}</div>
        <div class="tab-pane fade" id="network_suri_tls_tab">{% include "analysis/network/_suricata_tls.html" %}</div>
        <div class="tab-pane fade" id="network_suri_http_tab">{% include "analysis/network/_suricata_http.html" %}</div>
        <div class="tab-pane fade" id="network_suri_files">{% include "analysis/network/_suricata_files.html" %}</div>
    </div>
